Repository navigation
Add asyncio support to the Python SDK - #57
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## py310-v2 #57 +/- ##
============================================
+ Coverage 86.60% 95.71% +9.10%
============================================
Files 7 15 +8
Lines 209 933 +724
Branches 19 130 +111
============================================
+ Hits 181 893 +712
- Misses 28 40 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Setting this back to draft while we expand the feature scope: the v2 PR should also cover the full Transloadit API endpoint surface before we treat it as ready. I added a matching @todo to the 2.0.0 CHANGELOG section so the release notes get updated once the endpoint coverage is complete. |
kvz
marked this pull request as draft
May 21, 2026 14:07
The generator no longer emits function-local imports; base64, urljoin, and requests (sync only) now live in the handwritten module headers where Python convention expects them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
resume_tus_upload() is generated from the API2 resumeUpload TUS protocol contract in both the sync and asyncio clients: it discovers the server offset with a HEAD request, PATCHes the remaining bytes from that offset, asserts the final offset matches the content length, and waits for the Assembly to finish. The new api2-devdock-tus-resume-upload example interrupts an upload after the first chunk like a dropped connection would, then resumes it through the public SDK method. The lifecycle example now polls the Assembly list briefly because the API acknowledges creation before the list storage row lands. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # .github/workflows/ci.yml
16 tasks
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Python SDK 2.0 adds asyncio over the existing handwritten client surface, together with the Python 3.12+ floor and version preparation in #56.
AsyncTransloaditmirrors the synchronous Assembly, Template and billing methods and shares Smart CDN signing.Closes #9.
Changes
asyncio.sleep, and tuspy resumable uploads in worker threads. Cancellation drains active file reads/uploads before caller-owned files close.assembly_id,assembly_ssl_url,assembly_url; Templateid,name,content.AssemblyPollingError, retaining the Assembly URL and creation/last responses for recovery. Error/response serialization preserves those values. Unsigned query value encoding and empty/whitespace responses match sync behavior while JSON null remains distinct.Contract-generated endpoints are outside 2.0. Removed the Python-local generator, contract pin, generated blocks/transports, coverage table and CI/tox drift checks. #61 preserves the complete pre-removal snapshot and links #60; it waits for API2-owned SDK emitters in api2#9252, owned by the existing studio1
~/code/api2session.Validation and council review
3c0a3a3: 167 passed, 12 opt-in skips on each Python 3.12/3.13/3.14; 94.22% coverage and Node CLI signature parity pass.Release
Released on 2026-10-11 after the approved squash sequence #57 → #56 → main. The release commit and
v2.0.0tag are46a98f3bf48762839b7f14a378beb359d74c0a8e.aiohttp 3.14.5,urllib3 2.8.0). Existing dependency follow-ups remain outside this release-scope change.tim-kosremains requested; both cards are Done. Contract generation remains deferred in #61, blocked by api2#9252 and linked to #60.Friction: review caught recovery/query gaps after the first fixes, requiring two further CI batches. Review sandboxes restricted some local networking/capture, so full local Docker/live checks and actual seven-job CI provide runtime evidence. The release has no remaining council findings.
🤖 Claimed by kvz on
framework1/python-sdksince 2026-10-11 · resume:codex resume 01a12c04-6ff8-7a91-9987-654db44d852e